﻿using System;
using System.Web.Profile;
using System.Web.Security;

namespace WebApp
{
    public class UserProfile : ProfileBase
    {
        public static UserProfile getUserProfile(string username)
        {
            return Create(username) as UserProfile;
        }
        public static UserProfile getUserProfile()
        {
            return Create(Membership.GetUser().UserName) as UserProfile;
        }

        [SettingsAllowAnonymous(false)]
        public int CompanyId
        {
            get { return Convert.ToInt32(base["CompanyId"]); }
            set { base["CompanyId"] = value; }
        }

    }
}